<?php

use think\facade\Route;

//miss路由，定义404
Route::miss(function () {
    @header("http/1.1 404 not found");
    @header("status: 404 not found");
    exit();
});

//支付回调
Route::group('callback', function () {
    Route::rule('/mallWechat', 'callback/mallWechat');//商城-微信回调
    Route::rule('/mallAlipay', 'callback/mallAlipay');//商城-支付宝回调

    Route::rule('/mallWechatHandle', 'callback/mallWechatHandle');//商城-微信回调（临时）
});

//退款回调
Route::group('callback', function () {
    Route::rule('/mallWechatRefund', 'callback/mallWechatRefund');//商城-微信退款回调
});

//订单相关
Route::group('order', function () {
    Route::rule('/autoCancel', 'order/autoCancel');//订单超时未支付自动取消
    Route::rule('/autoReceipt', 'order/autoReceipt');//订单自动收货
    Route::rule('/orderReward', 'order/orderReward');//订单确认收货后的后续奖励，升级，入池等
    Route::rule('/orderPooled', 'order/orderPooled');//订单确认收货后订单利润进入分红池

});

//退款回调
Route::group('statistics', function () {
    Route::rule('/statistics', 'statistics/statistics');//商城-微信退款回调
});
